import { $delete, $get } from '@js/request'
import { VideoCourtSchema, VideoPartySchema } from '@src/components/schema/videoCourt';
import { CaseSchema } from '@src/components/schema/caseSchema';

export async function getMeetingDataRequest (id: string): Promise<VideoCourtSchema> {
  const res = await $get(`/api/commission/meeting/${id}`)
  return res.data
}

export async function getCaseDataRequest (id: string): Promise<CaseSchema> {
  const res = await $get(`/api/commission/case/${id}`)
  return res.data
}

export async function getPersonRequest (meetingid: string): Promise<VideoPartySchema[]> {
  const res = await $get('/api/commission/meetingParticipant', { meetingid })
  return res.data
}

export async function delRequest (id: string): Promise<void> {
  const res = await $delete(`/api/commission/meetingParticipant/${id}`)
  return res.data
}
